<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%String path = request.getContextPath();%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>核销推送明细</title>
    <jsp:include page="../../import.jsp" flush="true"/>
    <style type="text/css">
        .searchArea .fieldBox .label{width: 60px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;}
    </style>
</head>

<body class="iframeBody">

<input name="repayBatNos" id="repayBatNos" type="hidden" value="${repayBatNos}">
 <div id="ligergrid1" class="sq-grid"></div>

<script type="text/javascript">
var repayGrid = null;
$(function () {
    initGrid();//初始还款列表
});

//初始化列表
function initGrid(){
    var repayBatNos = $("#repayBatNos").val();
    $("#ligergrid1").ligerGrid({
        // data: data,
        method:'get',
        url:'<%=path%>/mcr/mcrWriteOffPushDetail/writeOffPushDetailListInfo.do?repayBatNos='+repayBatNos,
        columns:[
        	{ display: '批次号', name: 'batNo', width: 120, enabledSort:true },
            { display: '还款笔数', name: 'repayNum', width: 150, enabledSort:true},
            { display: '实收总金额(元)', name: 'repayAmt', width: 150, enabledSort:true},
            { display: '实收本金(元)', name: 'repayPrincipal', width: 150, enabledSort:true},
            { display: '实收利息(元)', name: 'repayInterest', width: 150, enabledSort:true},
            { display: '实收罚息(元)', name: 'repayPenaltyInterest', width: 150, enabledSort:true},
            getGridOperColumnContent()//操作列
        ],
        pageSize: 10,
        root: 'rows',
        record: 'total',
        hideLoadButton: true,
        width: '100%',
        height: '100%',
        heightDiff: -2,
        checkbox: true,
        rownumbers: true,
        allowUnSelectRow: true,
        alternatingRow: false
    });
    repayGrid = liger.get("ligergrid1");
    $("#repayForm").ligerForm();
}

//Grid操作列
function getGridOperColumnContent(){
	var data = {
            display: '操作',
            isSort: false,
            width: 280,
            render: function (rowdata, rowindex, value){
               	var i='<a class="sq-button-hasicon" href="javascript:checkDetails(';
                    i+="'"+rowdata.batNo+"'";
                    i+=')"><i class="sqBtnIco_4"></i>查看明细</a>';
               	var returnStr = i;  
               	return returnStr;
            }
        }
	return data;
}

//查看明细
function checkDetails(batNo) {
	 $.ligerDialog.open({
         width: 800,
         height: 500,
         title: '明细',
         url: '<%=path%>/mcr/mcrWriteOffConfirmDetail/checkDetails.do?batNo='+batNo
     });
}



</script>

</body>
</html>
